package biz.core.controller;

import java.util.List;

import biz.core.base.BaseAction;
import biz.core.service.AreaService;

import common.tree.StrutsTreeNode;
import common.util.StrutsTreeUtil;

public class AreaAction extends BaseAction{
	private AreaService areaService;
	public StrutsTreeNode root;
	@SuppressWarnings("unchecked")
	@Override
	public String execute() throws Exception {
		List areas=areaService.findAll();
		this.root=StrutsTreeUtil.getTreeRoot(areas);
		return 	SUCCESS;
	}
	public void setAreaService(AreaService areaService) {
		this.areaService = areaService;
	}
	public StrutsTreeNode getRoot() {
		return root;
	}
	public void setRoot(StrutsTreeNode root) {
		this.root = root;
	}
	
	

}
